package com.pug.zixun.commons.ex;

import com.pug.zixun.commons.enums.AdminResultInterface;

/**
 * @Description: 自定义比较器异常
 * @Author: WengYu
 * @CreateTime: 2022/05/19 00:57
 */
public class PugValidatorException extends RuntimeException {

    private Integer code;
    private String message;

    public PugValidatorException(AdminResultInterface adminResultInterface) {
        super(adminResultInterface.getMessage());
        this.code = adminResultInterface.getCode();
        this.message = adminResultInterface.getMessage();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
